package com.ipay.core;

import org.springframework.stereotype.Component;

import com.ipay.exception.BaseException;
import com.ipay.utils.SpringContextUtils;

@Component
public class PaySystem {
	
	private static PaySystem sys;
	
	public static PaySystem get() {
		if(sys == null) sys = SpringContextUtils.getBean("system", PaySystem.class);
		return sys;
	}
	
	public void error(String key) {
		throw new BaseException(key);
	}
	
	public void error(String key, String message) {
		throw new BaseException(key, message);
	}
}
